package com.milk.milkmedia.ui;

import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.milk.milkmedia.R;

/**
 * Created by 微安 on 2015/7/22.
 */
public class FeedBackFragment extends Fragment {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View rootView = inflater.inflate(R.layout.fragment_feedback,container,false);
        return rootView;
    }

    @Override
    public void onAttach(Activity activity) {
        super.onAttach(activity);
        ((HomePageActivity)activity).onSectionAttached(getArguments().
                getInt(HomePageActivity.ARG_SECTION_NUMBER));
    }

    public static FeedBackFragment newInstance(int sectionNum){
        FeedBackFragment feedBackFragment = new FeedBackFragment();
        Bundle bundle= new Bundle();
        bundle.putInt(HomePageActivity.ARG_SECTION_NUMBER, sectionNum);
        feedBackFragment.setArguments(bundle);
        return  feedBackFragment;
    }
}
